﻿var Common = {
    //消息提示
    ShowBox : function (status, message, title) {
        
        switch (status) {
            case 1:
                toastr.success(message, title)
                break;
            case 2:
                toastr.error(message, title)
                break;
            case 3:
                toastr.info(message, title)
                break;
            default:
                toastr.warning(message, title)
        }
    },

    ActiveCurrentNav:function(){
        var currentUrl = window.location.pathname.toString().toLowerCase();;
        var links = $('#leftNav a');
        $.each(links, function () {
            var url = $(this).attr("href").toLowerCase();           
            if (currentUrl === url) {
                $(this).addClass("active");
            }
        });
       
    }
   
};


